package io.adrainty.bolee.insurance.service;

import io.adrainty.bolee.insurance.models.entity.WarrantyEarningsOrderEntity;
import io.adrainty.bolee.insurance.models.entity.WarrantyEntity;
import io.adrainty.bolee.insurance.models.request.DoInsuranceDTO;

import java.util.List;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/26 上午12:55
 */
public interface IWarrantyService {

    /**
     * 批量保存
     * @param warrantyEarningsOrderList 批量保存的保单收益订单
     */
    void saveEarningsOrderBatch(List<WarrantyEarningsOrderEntity> warrantyEarningsOrderList);

    /**
     * 保险购买
     * @param doInsuranceDTO 保险购买参数
     * @return 保险购买结果
     */
    WarrantyEntity doInsure(DoInsuranceDTO doInsuranceDTO);

    /**
     * 清理合同保单
     * @param warrantyNo 保单编号
     * @return 删除结果
     */
    Boolean cleanWarranty(String warrantyNo);

    /**
     * 签约
     * @param warrantyOrderId 保单订单编号
     * @param tradingChannel 交易渠道
     * @return 签约结果
     */
    String signContract(Long warrantyOrderId, String tradingChannel);
}
